home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
ControlStrip.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
10KB
|
391 lines
;
; File: ControlStrip.a
;
; Contains: Control Strip (for Powerbooks and Duos) Interfaces.
;
; Version: Technology: System 7.5
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__CONTROLSTRIP__') = 'UNDEFINED' THEN
__CONTROLSTRIP__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
include 'Menus.a'
ENDIF
IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
include 'Dialogs.a'
ENDIF
;
;********************************************************************************************
;
; messages passed to the modules
;
;********************************************************************************************
;
sdevInitModule EQU 0 ; initialize the module
sdevCloseModule EQU 1 ; clean up before being closed
sdevFeatures EQU 2 ; return feature bits
sdevGetDisplayWidth EQU 3 ; returns the width of the module's display
sdevPeriodicTickle EQU 4 ; periodic tickle when nothing else is happening
sdevDrawStatus EQU 5 ; update the interface in the Control Strip
sdevMouseClick EQU 6 ; user clicked on the module's display area in the Control Strip
sdevSaveSettings EQU 7 ; saved any changed settings in module's preferences file
sdevShowBalloonHelp EQU 8 ; puts up a help balloon, if the module has one to display
;
;********************************************************************************************
;
; Features supported by the module. If a bit is set, it means that feature is supported.
; All undefined bits are reserved for future use by Apple, and should be set to zero.
;
;********************************************************************************************
;
sdevWantMouseClicks EQU 0 ; notify the module of mouseDown events
sdevDontAutoTrack EQU 1 ; call the module to do mouse tracking
sdevHasCustomHelp EQU 2 ; module provides its own help messages
sdevKeepModuleLocked EQU 3 ; module needs to be locked in the heap
;
;********************************************************************************************
;
; Result values returned by the sdevPeriodicTickle and sdevIconMouseClick selectors.
; If a bit is set, the module can request that a specific function is performed by
; the Control Strip. A result of zero will do nothing. All undefined bits are reserved
; for future use by Apple, and should be set to zero.
;
;********************************************************************************************
;
sdevResizeDisplay EQU 0 ; resize the module's display
sdevNeedToSave EQU 1 ; need to save changed settings, when convenient
sdevHelpStateChange EQU 2 ; need to update the help message because of a state change
sdevCloseNow EQU 3 ; close a module because it doesn't want to stay around
;
;********************************************************************************************
;
; miscellaneous
;
;********************************************************************************************
;
sdevFileType EQU 'sdev' ; module's file type
sdevMenuItemMark EQU $A5 ; `*': `checkmark' to use in popup menus
; direction values for SBDrawBarGraph
BarGraphSlopeLeft EQU -1 ; max end of sloping bar graph is on the left
BarGraphFlatRight EQU 0 ; max end of flat bar graph is on the right
BarGraphSlopeRight EQU 1 ; max end of sloping bar graph is on the right
;
;********************************************************************************************
;
; utility routines to provide standard interface elements and support for common functions
;
;********************************************************************************************
;
;
; pascal Boolean SBIsControlStripVisible(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_SBIsControlStripVisible
moveq #0,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBIsControlStripVisible
ENDIF
;
; pascal void SBShowHideControlStrip(Boolean showIt)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBShowHideControlStrip
move.w #$0101,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBShowHideControlStrip
ENDIF
;
; pascal Boolean SBSafeToAccessStartupDisk(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_SBSafeToAccessStartupDisk
moveq #2,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBSafeToAccessStartupDisk
ENDIF
;
; pascal short SBOpenModuleResourceFile(OSType fileCreator)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBOpenModuleResourceFile
move.w #$0203,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBOpenModuleResourceFile
ENDIF
;
; pascal OSErr SBLoadPreferences(ConstStr255Param prefsResourceName, Handle *preferences)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBLoadPreferences
move.w #$0404,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBLoadPreferences
ENDIF
;
; pascal OSErr SBSavePreferences(ConstStr255Param prefsResourceName, Handle preferences)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBSavePreferences
move.w #$0405,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBSavePreferences
ENDIF
;
; pascal void SBGetDetachedIndString(StringPtr theString, Handle stringList, short whichString)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBGetDetachedIndString
move.w #$0506,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBGetDetachedIndString
ENDIF
;
; pascal OSErr SBGetDetachIconSuite(Handle *theIconSuite, short theResID, unsigned long selector)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBGetDetachIconSuite
move.w #$0507,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBGetDetachIconSuite
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
;
; pascal short SBTrackPopupMenu(const Rect *moduleRect, MenuHandle theMenu)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBTrackPopupMenu
move.w #$0408,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBTrackPopupMenu
ENDIF
ENDIF
;
; pascal short SBTrackSlider(const Rect *moduleRect, short ticksOnSlider, short initialValue)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBTrackSlider
move.w #$0409,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBTrackSlider
ENDIF
;
; pascal OSErr SBShowHelpString(const Rect *moduleRect, StringPtr helpString)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBShowHelpString
move.w #$040A,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBShowHelpString
ENDIF
;
; pascal short SBGetBarGraphWidth(short barCount)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBGetBarGraphWidth
move.w #$010B,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBGetBarGraphWidth
ENDIF
;
; pascal void SBDrawBarGraph(short level, short barCount, short direction, Point barGraphTopLeft)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBDrawBarGraph
move.w #$050C,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBDrawBarGraph
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
;
; pascal void SBModalDialogInContext(ModalFilterUPP filterProc, short *itemHit)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBModalDialogInContext
move.w #$040D,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBModalDialogInContext
ENDIF
ENDIF
; The following routines are available in Control Strip 1.2 and later.
;
; pascal OSErr SBGetControlStripFontID(short *fontID)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBGetControlStripFontID
move.w #$020E,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBGetControlStripFontID
ENDIF
;
; pascal OSErr SBSetControlStripFontID(short fontID)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBSetControlStripFontID
move.w #$010F,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBSetControlStripFontID
ENDIF
;
; pascal OSErr SBGetControlStripFontSize(short *fontSize)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBGetControlStripFontSize
move.w #$0210,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBGetControlStripFontSize
ENDIF
;
; pascal OSErr SBSetControlStripFontSize(short fontSize)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBSetControlStripFontSize
move.w #$0111,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBSetControlStripFontSize
ENDIF
;
; pascal OSErr SBGetShowHideHotKey(short *modifiers, unsigned char *keyCode)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBGetShowHideHotKey
move.w #$0412,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBGetShowHideHotKey
ENDIF
;
; pascal OSErr SBSetShowHideHotKey(short modifiers, unsigned char keyCode)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBSetShowHideHotKey
move.w #$0213,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBSetShowHideHotKey
ENDIF
;
; pascal OSErr SBIsShowHideHotKeyEnabled(Boolean *enabled)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBIsShowHideHotKeyEnabled
move.w #$0214,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBIsShowHideHotKeyEnabled
ENDIF
;
; pascal OSErr SBEnableShowHideHotKey(Boolean enabled)
;
IF ¨ GENERATINGCFM THEN
Macro
_SBEnableShowHideHotKey
move.w #$0115,D0
dc.w $AAF2
EndM
ELSE
IMPORT_CFM_FUNCTION SBEnableShowHideHotKey
ENDIF
ENDIF ; __CONTROLSTRIP__